package com.cy.pj.sys.controller;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.cy.pj.common.vo.JsonResult;
import com.cy.pj.sys.entity.SysMsg;
import com.cy.pj.sys.service.SysMsgService;

@RestController
@RequestMapping("/msg/")
public class SysMsgController {

	@Autowired
	private SysMsgService sysMsgService;
	
	@RequestMapping("doSaveMsg")
	public JsonResult doSaveMsg(Integer id,String msg) {
		sysMsgService.saveMsg(id, msg);
		return new JsonResult("发送成功");
		
	}
	
	@RequestMapping("doShowMsg")
	public JsonResult doshowMsg() {
		return new JsonResult(sysMsgService.showMsg());
		
	}
}
